#include <stdio.h>
#include <string.h>

#define SIZE 200
/*char result[SIZE];*/
int result[SIZE];
char tempa[SIZE];
char tempb[SIZE];
char tempc[SIZE];
#define TO_CHAR(x) (x + '0')
#define TO_NUM(x) (x - '0')

int mult(char *a, char *b, char *res)
{
	int lena = strlen(a);
	int lenb = strlen(b);
	int h,l;
	memset(result, 0, (lena+lenb)*sizeof(int));
	int i,j;
	int x;
	for (i=0; i<lena; i++){
		for (j=0; j<lenb; j++){
			x = TO_NUM(a[i]) * TO_NUM(b[j]);
			result[i+j] += x / 10;	/*high*/
			result[i+j+1] += x % 10;	/*low*/
		}
	}
	for (i=lena+lenb-1; i>=0; i--){
		if ( i > 0 ){
			result[i-1] += result[i] / 10;
		}
		result[i] = result[i] % 10;
		res[i] = TO_CHAR(result[i]);
	}
	res[lena + lenb] = 0;
}

char *mypow(char *s, int n, char* res)
{
	memset(res, 0, SIZE);
	if ( n == 0 ) {
		strcpy(res, "1");
		return res;
	} else if ( n == 1 ) {
		strcpy(res, s);
		return res;
	} else {
		if ( n & 1 ) {
			mypow(s, n>>1, tempa);
			mult(tempa, tempa, tempb);
			mult(s, tempb, res);
		}else{
			mypow(s, n>>1, tempa);
			mult(tempa, tempa, res);
		}
		return res;
	}
}

char* tos(char *src, char* dst, int *point)
{
	int i=0;
	int n = 0;
	int c;
	while (c=src[i]){
		if (c=='.' ){
			if (i==0){
				dst[n++] = '0';
			}
			(*point)++;
		}else {
			if (*point>0) {
				(*point)++;
			}
			dst[n++] = c;
		}
		i++;
	}
	(*point)--;
	if (*point < 0) {
		*point = 0;
	}
	dst[n] = 0;
	/*printf("###### %s\n", dst);*/
}
char* insert(char *src, char n)
{
	strcpy(tempa, src);
	src[n] = '.';
	strcpy(&src[n+1], &tempa[n]);
	return src;
}

char *real_pow(char *s, int point, char n, char *res)
{
	memset(res, 0, SIZE);
	mypow(s, n, tempc);
	int i;
	int lens = strlen(tempc);
	int point_pos = lens - point * n ;
	insert(tempc, point_pos);
	lens = strlen(tempc);
	for (i=0; i<lens && i <= point_pos; i++){
		if (tempc[i] != '0'){
			i++;
			break;
		}
	}
	strcpy(res, &tempc[i-1]);
	int lenres = strlen(res);
	for (i=lenres-1; i>=0; i--){
		if (res[i] == '.'){
			res[i] = 0;
			break;
		}else if (res[i] != '0'){
			break;
		}
		res[i] = 0;
	}
	if (res[0] == 0) {
		res[0] = '0';
	}

	return res;
}

char* real_pow1(char *s, int point, char n, char *res)
{
	memset(res, 0, SIZE);
	mypow(s, n, tempc);
	int i=0;
	int j=0;
	int notzero=0;
	int hasaddpoint=0;
	int lens = strlen(tempc);
	int point_pos = lens - point * n -1;
	for (i=0; i<lens; i++){
		if (notzero || tempc[i] != '0' || i == point_pos+1){
			if ( !hasaddpoint && i==point_pos+1 && tempc[i] == '0'){
				hasaddpoint = 1;
				res[j] = '.';
				j++;
			}
			notzero = 1;
			res[j] = tempc[i];
			j++;
			if (!hasaddpoint && (i==point_pos )) {
				hasaddpoint = 1;
				res[j] = '.';
				j++;
			}
		}
	}
	int reverstonu=0;
	for (i=strlen(res)-1; i>=0; i--){
		if (!reverstonu && (res[i] == '0' || res[i] == '.')){
			res[i] = 0;
		}else{
			reverstonu = 1;
		}
	}
	if ( res[0] == 0) {
		res[0] = '0';
	}
}

int main(int argc, char* argv[])
{
	char a[8];
	char res[SIZE];
	int b;
	int point,respoint;
	while (scanf("%s %d", a, &b) != EOF )
	{
		/*printf("%s\n",mypow(a, b, res));*/
		point=0;
		tos(a, tempa, &point);
		strcpy(a, tempa);
		real_pow(a, point, b, res);
		printf("%s\n", res);
	}
	return 0;
}



